package com.cskaoyan.mapper;

import com.cskaoyan.bean.good.Goods;
import com.cskaoyan.bean.GoodsBO;
import com.cskaoyan.bean.GoodsExample;
import com.cskaoyan.weixin.bean.goods.GoodsListBean;
import com.cskaoyan.weixin.bean.home.HotGoodsListBean;
import com.cskaoyan.weixin.bean.home.NewGoodsListBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsMapper {
    long countByExample(GoodsExample example);

    int deleteByExample(GoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    List<Goods> selectByExampleWithBLOBs(GoodsExample example);

    List<Goods> selectByExample(GoodsExample example);

    Goods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKeyWithBLOBs(Goods record);

    int updateByPrimaryKey(Goods record);
    List<Goods> selectGoodsList(@Param("id") String id, @Param("name") String name,
                                @Param("sort") String sort, @Param("order") String order);



    void updateByGoodsSn(Goods goods);

    Integer selectTotalGoods();


    List<NewGoodsListBean> selectNewGoods();

    List<HotGoodsListBean> selectHotGoods();

    Integer goodscount();

    Goods selectInfo(@Param("id") Integer id);
    int selectGoodsNumber();

    Integer goodsListcount(@Param("categoryId") Integer categoryId);

    List<GoodsListBean> selectGoodsListBean(@Param("categoryId") Integer categoryId);
    int selectNewId();

    List<GoodsListBean> selectGoods(@Param("categoryId") Integer categoryId);

    List<GoodsListBean> selectGoodsByKey(@Param("keyword") String keyword);
}

